package com.ruoyi.project.experiment.experimentstudent.mapper;

import com.ruoyi.project.experiment.experimentstudent.domian.EchartResult;
import com.ruoyi.project.experiment.experimentstudent.domian.StatusOther;
import com.ruoyi.project.experiment.experimentstudent.domian.StudentExperiment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 实验成绩Mapper接口
 * 
 * @author lvyongwei
 * @date 2020-09-21
 */
@Mapper
public interface TbExperimentReportMapper {

    /**
     * 新增实验成绩
     *
     * @param studentExperiment 实验成绩
     * @return 结果
     */
    public int insertTbExperimentReport(StudentExperiment studentExperiment);

    /**
     * 提交实验报告
     *
     * @param studentExperiment 实验成绩
     * @return 结果
     */
    public int updateTbExperimentReport(StudentExperiment studentExperiment);

    /**
     * 查询是否提交在线实验成绩
     * @param studentExperiment
     * @return
     */
    public StudentExperiment getReport(StudentExperiment studentExperiment);

    /**
     * 教师获取实验结果
     * @param studentExperiment
     * @return
     */
    public List<StudentExperiment> getResults(StudentExperiment studentExperiment);

    /**
     * 获取实验结果
     * @Param reportExperimentId  实验id
     * @Param reportStuId   学生id
     * @return
     */
    public List<StudentExperiment> getResultExperiment(StudentExperiment studentExperiment);


    /**
     * 教师批改实验 评语+分数
     * @param studentExperiment
     * @return
     */
    public boolean checkScore(StudentExperiment studentExperiment);



    /**
     * 学生获取实验结果
     * @param studentExperiment
     * @return
     */
    public List<StudentExperiment> getResults2(StudentExperiment studentExperiment);

    /**
     * 根据实验id删除提交的实验报告
     * @param experimentIds
     * @return
     */
    public boolean deleteReportByExperimentId(String[] experimentIds);




    /**
     * 做图表
     */
    /**
     * 获取实验体验人次
     * @return
     */
    public List<StudentExperiment> getStuCount();
    /**
     * 获取某一个实验的成绩分布
     */
    public EchartResult getScore(Long experimentId);
    /**
     * 获取每个实验最常用时和最短用时，以及最高、低分数
     */
    public List<EchartResult> getDescribe();

    public List<StatusOther> getStuCountOther();
}
